Crate bitbybit

source ·

Attribute Macros§

  • Defines a bitenum: #[bitenum(<base-data-type>, exhaustive = true)] <base-data-type> is a data type like u2 or u8 which is used as the storage type when in in bitfields. exhaustive specifies whether the bitenum includes all possible value of the given base data type (for example, a bitenum over u2 with 4 values is exhaustive)
  • Defines a bitfield: #[bitfield(<base-data-type>, default = 0)] <base-data-type> is a data type like u32 which is used to represent all the bits of the bitfield. default is an optional default when the bitfield is created